home *** CD-ROM | disk | FTP | other *** search
/ Greenhouse Effect Detection Expriment / NASA Greenhouse Effect Detection Expriment 1992 - Disc 2.iso / software / dos / cdf22pc / src / include / cdf2skt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-26  |  2.5 KB  |  87 lines

  1. /******************************************************************************
  2. *
  3. *  NSSDC/CDF                    Header file for SkeletonTable.
  4. *
  5. *  Version 1.0, 25-Feb-92, ST Systems (STX)
  6. *
  7. *  Modification history:
  8. *
  9. *   V1.0  25-Feb-92, J Love      Original version.
  10. *
  11. ******************************************************************************/
  12.  
  13. /******************************************************************************
  14. * Positions/widths.
  15. ******************************************************************************/
  16.  
  17. #define MAX_LINE_LEN        78
  18. #define MAX_COL_TO_USE        (MAX_LINE_LEN - 1)
  19. #define ENTRY_NUM_COL        20
  20. #define ENTRY_NUM_WIDTH        5
  21. #define VAR_DATATYPE_COL    20
  22. #define ENTRY_DATATYPE_COL    20
  23. #define VAR_NUMELEMS_WIDTH    5
  24.  
  25. /******************************************************************************
  26. * Function Prototypes.
  27. ******************************************************************************/
  28.  
  29. #if defined(vms) | defined(__MSDOS__)
  30. void WriteHeader (char *);
  31. void WriteGlobalAttr (void);
  32. void WriteVarAttr (void);
  33. void WriteVar (enum NRVlocENUM);
  34. void WriteEnd (void);
  35. void WriteNRVdata (FILE *, long, long, long, long *);
  36. char *DataType (long);
  37. void StatusHandler (CDFstatus);
  38. #endif
  39.  
  40. #if defined(unix)
  41. void WriteHeader ();
  42. void WriteGlobalAttr ();
  43. void WriteVarAttr ();
  44. void WriteVar ();
  45. void WriteEnd ();
  46. void WriteNRVdata ();
  47. char *DataType ();
  48. void StatusHandler ();
  49. #endif
  50.  
  51. /******************************************************************************
  52. * Enumerators.
  53. ******************************************************************************/
  54.  
  55. enum NRVlocENUM {noNRV, NRVinSKT, NRVinNRV};
  56.  
  57. /******************************************************************************
  58. * Increment to next set of indices, column majority.
  59. ******************************************************************************/
  60.  
  61. #define INCRindicesCOL(numDims,dimSizes,indices) { \
  62. int _z_; \
  63. for (_z_ = 0; _z_ < numDims; _z_++) { \
  64.    if (indices[_z_] == dimSizes[_z_] - 1) \
  65.      indices[_z_] = 0; \
  66.    else { \
  67.      indices[_z_]++; \
  68.      break; \
  69.    } \
  70. } \
  71. }
  72. /******************************************************************************
  73. * Increment to next set of indices, row majority.
  74. ******************************************************************************/
  75.  
  76. #define INCRindicesROW(numDims,dimSizes,indices) { \
  77. int _z_; \
  78. for (_z_ = numDims - 1; _z_ >= 0; _z_--) { \
  79.    if (indices[_z_] == dimSizes[_z_] - 1) \
  80.      indices[_z_] = 0; \
  81.    else { \
  82.      indices[_z_]++; \
  83.      break; \
  84.    } \
  85. } \
  86. }
  87.